package com.huike.pmps.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huike.pmps.model.entity.SupplierWarehouseReceipt;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 作者：谌贵斌(黑桃K)
 * 日期: 2888-08-08
 * 老师QQ: 272488352
 * 官方QQ交流群: 377748272
 * 刀客程序员官网：http://www.daoke360.com
 * 刀客程序员淘宝旗舰店：https://daoke360.taobao.com/
 */
public interface SupplierWarehouseReceiptDao extends BaseMapper<SupplierWarehouseReceipt> {


    @Select("select avg(course_quality_evaluation) from `p_supplier_warehouse_receipt` where supplier_id=#{supplierId}")
    Double selectSupplierEvaluation(Integer supplierId);

    @Update("UPDATE `p_supplier_warehouse_receipt` SET supplier_info_acceptance_report_path=#{ acceptanceReportPath } WHERE po_course_id=#{poCourseId} ")
    int updateAcceptanceReportByPoCourseId(String acceptanceReportPath,Integer poCourseId);
}
